package org.PISS.controller.model;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;

/**
 * Created with IntelliJ IDEA.
 * User: mafi0813
 * Date: 22.04.14
 * Time: 23:19
 * To change this template use File | Settings | File Templates.
 */
@Entity
public class Fieldset {
    @Id
    @Column(name = "FIELDSET_ID")
    @GenericGenerator(name="generator", strategy="increment")
    @GeneratedValue(generator="generator")
    private long fieldsetId;

    @Column
    private String desription;

    @Column(name = "DATA_TABLE")
    private String dataTable;
    @Column(name = "PRODUCT_TYPE_ID")
    private long producrTypeId;

    private boolean required;

    public Fieldset(){
        super();
    }

    public Fieldset(String desription, long producrTypeId, String dataTable, boolean required) {
        this.desription = desription;
        this.producrTypeId = producrTypeId;
        this.dataTable = dataTable;
        this.required = required;
    }

    public long getFieldsetId() {
        return fieldsetId;
    }

    public void setFieldsetId(long fieldsetId) {
        this.fieldsetId = fieldsetId;
    }

    public String getDesription() {
        return desription;
    }

    public void setDesription(String desription) {
        this.desription = desription;
    }

    public String getDataTable() {
        return dataTable;
    }

    public void setDataTable(String dataTable) {
        this.dataTable = dataTable;
    }

    public long getProducrTypeId() {
        return producrTypeId;
    }

    public void setProducrTypeId(long producrTypeId) {
        this.producrTypeId = producrTypeId;
    }

    public boolean isRequired() {
        return required;
    }

    public void setRequired(boolean required) {
        this.required = required;
    }
}
